import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import jwtConfig from '../../config/jwt.config';
import { AuthController } from './auth.controller';
import { AuthService } from './auth.service';
import { User } from './entities/user.entity';
import { RefreshToken } from './entities/refresh-token.entity';
import { Friendship } from '../friends/entities/friendship.entity';
import { FriendshipStatus } from '../friends/entities/friendship.entity';

/**
 * 认证模块
 * 负责用户认证、注册等功能
 */
@Module({
  imports: [
    TypeOrmModule.forFeature([User, RefreshToken, Friendship]), // 注册实体
    jwtConfig, // 导入已配置的 JWT 模块
  ],
  controllers: [AuthController],
  providers: [AuthService],
  exports: [AuthService], // 导出服务供其他模块使用
})
export class AuthModule {}
